﻿Imports QuanLyCafe.HoaDon_DAO
Imports QuanLyCafe.HoaDon_BUS
Imports QuanLyCafe.HoaDon_DTO
Imports QuanLyCafe.SanPham_BUS
Imports QuanLyCafe.Menu_BUS

Public Class QuanLyBanHang

    Private Sub QuanLyBanHang_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
        Me.CenterToScreen()
        btnBan01.Enabled = False
        btnBan02.Enabled = False
        btnBan03.Enabled = False
        btnBan04.Enabled = False
        btnBan05.Enabled = False
        btnBan06.Enabled = False
        btnBan07.Enabled = False
        btnBan08.Enabled = False
        btnBan09.Enabled = False
        btnBan10.Enabled = False
        HienThiHD()
        HienThiMenu()
    End Sub

    Private Sub chbxBan10_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chbxBan10.CheckedChanged
        If chbxBan10.Checked = False Then
            btnBan10.Enabled = False
        Else
            btnBan10.Enabled = True
        End If
    End Sub
    Private Sub chbxBan09_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chbxBan09.CheckedChanged
        If chbxBan09.Checked = False Then
            btnBan09.Enabled = False
        Else
            btnBan09.Enabled = True
        End If
    End Sub
    Private Sub chbxBan08_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chbxBan08.CheckedChanged
        If chbxBan08.Checked = False Then
            btnBan08.Enabled = False
        Else
            btnBan08.Enabled = True
        End If
    End Sub
    Private Sub chbxBan07_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chbxBan07.CheckedChanged
        If chbxBan07.Checked = False Then
            btnBan07.Enabled = False
        Else
            btnBan07.Enabled = True
        End If
    End Sub
    Private Sub chbxBan06_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chbxBan06.CheckedChanged
        If chbxBan06.Checked = False Then
            btnBan06.Enabled = False
        Else
            btnBan06.Enabled = True
        End If
    End Sub
    Private Sub chbxBan05_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chbxBan05.CheckedChanged
        If chbxBan05.Checked = False Then
            btnBan05.Enabled = False
        Else
            btnBan05.Enabled = True
        End If
    End Sub
    Private Sub chbxBan04_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chbxBan04.CheckedChanged
        If chbxBan04.Checked = False Then
            btnBan04.Enabled = False
        Else
            btnBan04.Enabled = True
        End If
    End Sub
    Private Sub chbxBan03_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chbxBan03.CheckedChanged
        If chbxBan03.Checked = False Then
            btnBan03.Enabled = False
        Else
            btnBan03.Enabled = True
        End If
    End Sub
    Private Sub chbxBan02_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chbxBan02.CheckedChanged
        If chbxBan02.Checked = False Then
            btnBan02.Enabled = False
        Else
            btnBan02.Enabled = True
        End If
    End Sub
    Private Sub chbxBan01_CheckedChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles chbxBan01.CheckedChanged
        If chbxBan01.Checked = False Then
            btnBan01.Enabled = False
        Else
            btnBan01.Enabled = True
        End If
    End Sub

    Private Sub btnThoat_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnThoat.Click
        Close()
    End Sub

    Public Sub HienThiHD()
        Dim dt As DataTable = New DataTable()
        dt = GetListHD_BUS()
        gvDSHD.DataSource = dt
    End Sub
    Public Sub HienThiSP()
        Dim dt As DataTable = New DataTable()
        dt = GetListSP_BUS()
        'gvMenu.DataSource = dt
    End Sub
    Public Sub HienThiMenu()
        Dim dt As DataTable = New DataTable()
        dt = GetListMN_BUS()
        gvMenu.DataSource = dt
    End Sub

    Private Sub cbxSanPham_SelectedIndexChanged(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles cbxSanPham.SelectedIndexChanged

    End Sub

    Private Sub btnBack_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnBack.Click
        Me.Close()
    End Sub
End Class